package com.yuewen.permissioncheck.asm.checker;

/**
 * 大概位置
 *
 * @author zhanglulu
 */
public class GetLocationPermission extends BasePermission {
  @Override
  boolean check(InvokeParam param) {
    return "getLastKnownLocation".equals(param.methodName)
      && "(Ljava/lang/String;)Landroid/location/Location;".equals(param.methodDesc)
      && "android/location/LocationManager".equals(param.methodOwnClass);
  }

  @Override
  String invokeHookMethodName() {
    return "invokeGetLastKnownLocation";
  }
}
